﻿<%@ Page Language="C#" MasterPageFile="../MasterPages/MedianamikModule.Master" AutoEventWireup="True" CodeBehind="GroupList.aspx.cs" Inherits="Medianamik.UI.SecurityManagement.GroupList" %>

<asp:Content ID="ContextMenuContent" ContentPlaceHolderID="ContextMenu" runat="server">
    <asp:HyperLink ID="AddGroup" runat="server" CssClass="Action BtAjoutGroupe" Text="<%$ Resources: Medianamik_SecurityManagement,AddGroup%>" />
	<a href="#" class="Action BtAnnuler-Inactif"><asp:Localize runat="server" Text="<%$ Resources: Medianamik_Global,Cancel %>"></asp:Localize></a>
</asp:Content>
<asp:Content ID="MainTreeView" ContentPlaceHolderID="VariableRightPanel" runat="server">
   	<div class="BlocArbo">
   		<med:TreeView ID="groupsTreeView" runat="server" Width="222" Height="295" EnableEmbeddedSkins="false" Skin="Medianamik"
   		OnNeedChildren="groupsTreeView_NeedChildren"
   		OnNeedSelfAndParents="groupsTreeView_NeedSelfAndParents"
   		/> 
   	</div>
</asp:Content>
<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
	<med:BreadcrumbTrail ID="bctFilAriane" Root="<%$ Resources: Medianamik_TypeManagement, TypeManagement %>" runat="server" CssClass="FilAriane" Url="GroupList.aspx" ParamName="basetypeid" />
	<telerik:RadGrid runat="server" ID="GridGroups" EnableEmbeddedSkins="false" Skin="Medianamik" AutoGenerateColumns="false" 
	    OnItemCommand="GridGroups_ItemCommand" OnItemDataBound="GridGroups_ItemDataBound" 
	    OnNeedDataSource="GridGroups_NeedDataSource" >
		<MasterTableView>
			<Columns>
				<telerik:GridTemplateColumn HeaderText="">
		            <HeaderTemplate><asp:Literal runat="server" Text="<%$ Resources: Medianamik_SecurityManagement, GroupNameColumn %>"></asp:Literal></HeaderTemplate>
		            <ItemTemplate>
		                <img alt="" src="/Medianamik/images/Icones/Ico_UtilisateurGroupe.png" class="IconesElements" />
		                    <a href="<%# BaseUrl + Eval("Id") %>"><%# Eval("Name") %></a>
		                </ItemTemplate>
		        </telerik:GridTemplateColumn>
		        <telerik:GridTemplateColumn>
		            <HeaderTemplate><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources: Medianamik_SecurityManagement, GroupDescriptionColumn %>"></asp:Literal></HeaderTemplate>
		            <ItemTemplate>
		                <%# HttpContext.GetGlobalResourceObject("Medianamik_SecurityManagement", "Group_" + (string)Eval("Name"))%>
		            </ItemTemplate>
		        </telerik:GridTemplateColumn>
				<telerik:GridTemplateColumn HeaderStyle-Width="1%" HeaderText="Actions">
					<HeaderStyle HorizontalAlign="Center" />
					<ItemStyle CssClass="Actions" />
					<ItemTemplate>
						<table border="0" cellpadding="0" cellspacing="0" align="center">
							<tr>
								<td><a href="GroupManagement.aspx?name=<%# Eval("Name") %>" title="<%= Resources("Medianamik_Global", "Action_EditTooltip") %>"><img src="/medianamik/images/Icones/Ico_Edition.gif" alt="" width="16" height="16" /></a></td>
								<td><asp:HyperLink ID="PreviewSecurityLink" runat="server" onclick="GetRadWindowManager().Open(null, 'PreviewSecurityWindow');" Target="PreviewSecurityWindow"><img src="/Medianamik/images/Icones/Ico_Visualisation.gif" alt="" width="16" height="16" /></asp:HyperLink></td>
								<% if(IsCurrentUserSuperAdmin) { %>
								    <td><asp:HyperLink ID="VisiblePropertiesLink" runat="server" onclick="GetRadWindowManager().Open(null, 'VisiblePropertiesWindow');" Target="VisiblePropertiesWindow"><img src="/Medianamik/images/Icones/Ico_Visualisation.gif" alt="" width="16" height="16" /></asp:HyperLink></td>
								<% } %>
								<td><med:ConfirmedImageButton ID="cmdDelete" CommandArgument='<%# Eval("Name") %>' title="<%$ Resources: Medianamik_Global, Action_DeleteTooltip %>" CommandName="DeleteGroup" ImageUrl="/medianamik/images/Icones/Ico_Supprimer.gif" runat="server" ConfirmText="<%$ Resources: Medianamik_SecurityManagement, ConfirmDeleGroupText %>" /></td>
							</tr>
						</table>
					</ItemTemplate>
				</telerik:GridTemplateColumn>
			</Columns>
			<NoRecordsTemplate>
			    <asp:Literal ID="NoRecords" runat="server" Text="<%$ Resources: Medianamik_ContentManagement, NoRecordsToDisplay %>" />
			</NoRecordsTemplate>
		</MasterTableView>
		<ClientSettings EnableRowHoverStyle="true"></ClientSettings>
	</telerik:RadGrid>
</asp:Content>
